package com.zuoye.day04;

//银行类
public class Bank{
    //初始化50个容量的Account数组 用于 保存账户信息
    private Account[] accountArr = new Account[50];
    private  int size = 0; //已有账户

    //开户
    public Account registAccount(String username,String userPassword,long telno,int accType){
        Account acc = null;

        if(accType == 0){   //accType == 0 储蓄账户  1:信用账户
           SavingAccount sa = new SavingAccount(9876554567L,username,userPassword,telno,0,accType);
            }else {
            CreditAccount ca = new
                    CreditAccount();

        }
        accountArr[size++] = acc;
        return acc;
    }

}